/* 简历容器 */
.resumeContainer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 6rem; /* 为固定导航栏留出空间 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8fafc;
  min-height: 100vh;
}

/* 头部样式 */
.resumeHeader {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.headerContent {
  display: flex;
  align-items: center;
  gap: 30px;
}

.avatarSection {
  flex-shrink: 0;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.infoSection {
  flex: 1;
}

.name {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 16px 0;
  opacity: 0.9;
}

.summary {
  font-size: 1.1rem;
  margin: 0 0 24px 0;
  opacity: 0.95;
  line-height: 1.7;
}

.contactInfo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.contactItem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;

  .icon {
    font-size: 1.1rem;
  }

  a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;

    &:hover {
      opacity: 0.8;
    }
  }
}

/* 内容区域 */
.resumeContent {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 章节样式 */
.section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.sectionTitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: #2d3748;
  position: relative;
  padding-bottom: 12px;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
  }
}

/* 工作经验样式 */
.experienceList {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experienceCard {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s ease;
  background: #fafafa;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
  }
}

.experienceHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.experienceTitle {
  .position {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #2d3748;
  }

  .company {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #4a5568;
  }
}

.experienceMeta {
  text-align: right;
  font-size: 0.9rem;
  color: #718096;

  .date {
    display: block;
    font-weight: 500;
  }

  .location {
    display: block;
    margin-top: 2px;
  }
}

.experienceDescription {
  margin: 0 0 16px 0;
  color: #4a5568;
  font-size: 1rem;
}

.achievements {
  margin-bottom: 16px;
}

.achievementItem {
  margin-bottom: 6px;
  color: #2d3748;
  padding-left: 8px;
}

.experienceTech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 技能样式 */
.skillsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.skillCategory {
  background: #f7fafc;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.categoryTitle {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #2d3748;
}

.skillsList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skillItem {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skillHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skillName {
  font-weight: 500;
  color: #2d3748;
}

.skillLevel {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
}

.skillBar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.skillProgress {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.skillYears {
  font-size: 0.8rem;
  color: #718096;
}

/* 项目样式 */
.projectsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.projectCard {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  background: #fafafa;
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
  }
}

.projectHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.projectName {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: #2d3748 !important;
}

.projectRole {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

.projectDescription {
  margin: 0 0 16px 0;
  color: #4a5568;
  line-height: 1.6;
}

.projectHighlights {
  margin-bottom: 16px;
}

.highlightItem {
  margin-bottom: 6px;
  color: #2d3748;
  padding-left: 8px;
  font-size: 0.95rem;
}

.projectTech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.techTag {
  background: #e2e8f0;
  color: #4a5568;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.projectMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #718096;
  flex-wrap: wrap;
  gap: 8px;
}

.projectLinks {
  display: flex;
  gap: 12px;
}

.projectLink {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;

  &:hover {
    color: #764ba2;
  }
}

/* 教育背景样式 */
.educationList {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.educationCard {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
}

.educationHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;

  .school {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #2d3748;
  }

  .date {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
  }
}

.educationDetails {
  margin-bottom: 12px;

  .degree {
    margin: 0 0 4px 0;
    color: #4a5568;
    font-weight: 500;
  }

  .gpa {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
  }
}

/* 证书认证样式 */
.certificationsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.certificationCard {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
  text-align: center;
}

.certName {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #2d3748;
}

.certIssuer {
  margin: 0 0 6px 0;
  color: #4a5568;
  font-weight: 500;
}

.certDate {
  margin: 0 0 6px 0;
  color: #718096;
  font-size: 0.9rem;
}

.certId {
  margin: 0;
  color: #718096;
  font-size: 0.8rem;
}

/* 语言能力样式 */
.languagesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.languageItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.languageName {
  font-weight: 600;
  color: #2d3748;
}

.languageLevel {
  font-size: 0.9rem;
  color: #718096;
}

.languageBar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.languageProgress {
  height: 100%;
  background: linear-gradient(90deg, #48bb78, #38a169);
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* 兴趣爱好样式 */
.interestsList {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.interestTag {
  background: #f0f4f8;
  color: #2d3748;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .resumeContainer {
    padding: 16px;
  }
  
  .resumeHeader {
    padding: 24px;
  }
  
  .headerContent {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .name {
    font-size: 2rem;
  }
  
  .title {
    font-size: 1.3rem;
  }
  
  .contactInfo {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 20px;
  }
  
  .sectionTitle {
    font-size: 1.5rem;
  }
  
  .experienceHeader {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .experienceMeta {
    text-align: left;
  }
  
  .projectHeader {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .educationHeader {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .skillsGrid {
    grid-template-columns: 1fr;
  }
  
  .projectsGrid {
    grid-template-columns: 1fr;
  }
  
  .certificationsGrid {
    grid-template-columns: 1fr;
  }
  
  .languagesGrid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .avatar {
    width: 100px;
    height: 100px;
  }
  
  .name {
    font-size: 1.8rem;
  }
  
  .title {
    font-size: 1.2rem;
  }
  
  .section {
    padding: 16px;
  }
  
  .experienceCard,
  .projectCard,
  .educationCard,
  .certificationCard {
    padding: 16px;
  }
}

/* 打印样式 */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4;
    margin: 1.5cm;
  }

  .resumeContainer {
    background: white !important;
    padding: 0 !important;
    padding-top: 0 !important;
    max-width: none !important;
    min-height: auto !important;
  }
  
  .resumeHeader {
    background: #667eea !important;
    background-image: none !important;
    border-radius: 8px !important;
    padding: 30px !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid;
    break-inside: avoid;
    color: white !important;
    box-shadow: none !important;
  }

  .headerContent {
    gap: 20px !important;
  }

  .name {
    font-size: 2rem !important;
    text-shadow: none !important;
  }

  .title {
    font-size: 1.3rem !important;
    opacity: 1 !important;
  }

  .summary {
    font-size: 1rem !important;
    opacity: 1 !important;
  }

  .contactInfo {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .contactItem {
    font-size: 0.9rem !important;
  }

  .contactItem a {
    color: white !important;
    text-decoration: underline !important;
  }
  
  .resumeContent {
    gap: 20px !important;
  }

  .section {
    background: white !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .sectionTitle {
    font-size: 1.5rem !important;
    margin-bottom: 16px !important;
    color: #2d3748 !important;
  }

  .sectionTitle::after {
    background: #667eea !important;
    background-image: none !important;
  }

  .skillsGrid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .skillCategory {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .skillBar {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e0 !important;
  }

  .skillProgress {
    background: #667eea !important;
    background-image: none !important;
    border: none !important;
  }

  .experienceList {
    gap: 16px !important;
  }
  
  .experienceCard {
    background: #fafafa !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none !important;
  }

  .experienceCard:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .projectsGrid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .projectCard {
    background: #fafafa !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none !important;
  }

  .projectCard:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .projectRole {
    background: #667eea !important;
    color: white !important;
  }

  .techTag {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e0 !important;
  }
  
  .projectLink {
    color: #667eea !important;
    text-decoration: underline !important;
  }

  .projectLink::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #718096;
  }
  
  .educationList {
    gap: 16px !important;
  }

  .educationCard {
    background: #fafafa !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 隐藏不需要打印的元素 */
  .projectLinks a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #718096;
  }

  /* 确保所有文本颜色正确 */
  .position,
  .company,
  .projectName,
  .school {
    color: #2d3748 !important;
  }

  .achievementItem,
  .highlightItem {
    color: #2d3748 !important;
  }

  /* 避免在页面中间分页 */
  .skillItem,
  .achievementItem,
  .highlightItem {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}